let [x, , y] = [1, 2, 3]
let [head, ...tail] = [1, 2, 3, 4]
let [j, q, ...z] = ['a']
// 不完全解构
let [m, n] = [1, 2, 3]
// 对于set解构，也可以使用数组的解构赋值
let [a, b, c] = new Set(['a', 'b', 'c'])
// 默认赋值
let [d = true] = []
let [e = 1] = [undefined]
let [f = 1] = [null]

function getNumber () {
  return 100
}
let [g = getNumber()] = []
let [h = getNumber()] = [3]
// 对象的解构赋值
let {bar, foo} = {foo: 'aaaa', bar: 'bbb'}
let {foo: baz} = {foo: 'aaa', bar: 'bbb'}
// 单体内置对象的解构赋值
const [i, k, l, o, p] = 'hello'